new Vue({
	el: "body",
	data: {
		city: "地址选择",
		jobtypelist: ["销售", "客服", "市场", "财务", "人力资源", "行政", "项目", "质量", "高级管理", "IT", "互联网", "通信", "房产", "建筑", "物业管理", "金融", "采购", "贸易", "交通", "物流", "生产", "制造", "传媒", "印刷", "艺术", "设计", "咨询", "法律", "教育", "翻译", "服务业", "能源", "环保", "农业", "科研", "兼职", "实习", "社工", "其他"],
		jobtype: "职位类别",
		jobtypelistShow: false,
		industrylist: ["软件", "环保", "航空", "政府", "银行", "贸易", "科研", "网游", "工控", "物流", "租赁", "通讯", "电子", "化工", "媒体", "硬件", "机电", "IT服务", "旅游", "建筑"],
		industry: "行业类别",
		industrylistShow: false,
		searchtext: "",
	},
	methods: {
		cityChoose: function() { //跳转到城市选择页面
			location.href = "../city/index.html";
		},
		jobType: function(index) { //选择职位类型
			var jobtype = this.jobtypelist[index];
			this.jobtype = jobtype;
			this.jobtypelistShow = false;

		},
		job: function() { //弹出职位列表
			this.industrylistShow = false;
			this.jobtypelistShow = true;
		},
		indusTry: function(index) { //选择行业类型
			var industry = this.industrylist[index];
			this.industry = industry;
			this.industrylistShow = false;
		},
		ind: function() { //弹出行业列表
			this.industrylistShow = true;
			this.jobtypelistShow = false;
		},
		search: function() { //选择
			var city = set(this.city);
			var jobtype = set(this.jobtype == "职位类别" ? "" : this.jobtype);
			var industry = set(this.industry == "行业类别" ? "" : this.industry);
			location.href = "../joblist/joblist.html?city=" + city + "&jobtype=" + jobtype + "&industry=" + industry;
		},
		searText: function() { //搜索框查询
			var searchtext = this.searchtext;
			location.href = "../joblist/joblist.html?searchtext=" + searchtext;
		}
	},
	created: function() {
		init();
		var city = get(geturlitem(location.search, "city"));
		//解码获得城市
		if(city) {
			this.city = city;
		}
	}
})